﻿<UserControl x:Class="MySQLProviderODBC.UI.ServerDetails"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:sqcon="clr-namespace:MySQLProviderODBC.UI.Converters"
             mc:Ignorable="d" 
             TextOptions.TextFormattingMode="Display"
             d:DesignHeight="300" d:DesignWidth="300">
   
    <DockPanel LastChildFill="False">

        <!--Instructions-->
        <TextBlock DockPanel.Dock="Top" TextWrapping="Wrap" Margin="5">
            Enter the server name and log on details for the server to scan for databases:
        </TextBlock>
        
        <!--Server Name-->
        <DockPanel DockPanel.Dock="Top">
            <Label Style="{StaticResource dialogLabel}" KeyboardNavigation.TabIndex="0">Server Name:</Label>
            <TextBox Style="{StaticResource dialogTextbox}" Text="{Binding Path=ServerName, Mode=TwoWay}"
                     KeyboardNavigation.TabIndex="1"/>
        </DockPanel>
        
        <!--Port number-->
        <DockPanel DockPanel.Dock="Top">
            <Label Style="{StaticResource dialogLabel}" KeyboardNavigation.TabIndex="2">Port Number:</Label>
            <TextBox Style="{StaticResource dialogTextbox}" Text="{Binding Path=Port, Mode=TwoWay}"
                     KeyboardNavigation.TabIndex="3"/>
        </DockPanel>

        <!--Driver Version-->
        <DockPanel DockPanel.Dock="Top">
            <Label Style="{StaticResource dialogLabel}" KeyboardNavigation.TabIndex="4">Driver Version:</Label>
            <ComboBox Style="{StaticResource dialogCombo}" Text="{Binding Path=Version, Mode=TwoWay}" KeyboardNavigation.TabIndex="5">
                <ComboBoxItem>MySQL ODBC 3.51 Driver</ComboBoxItem>
                <ComboBoxItem>MySQL ODBC 5.1 Driver</ComboBoxItem>
            </ComboBox>
        </DockPanel>
        
        <!--Security Details-->
        <GroupBox DockPanel.Dock="Top" Header="Security Details" Style="{StaticResource serverDetails}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="90"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                
                <!--User name-->
                <Label Style="{StaticResource dialogLabel}" Grid.Row="0" Grid.Column="0" KeyboardNavigation.TabIndex="6">User Name:</Label>
                <TextBox Style="{StaticResource dialogTextbox}" Grid.Row="0" Grid.Column="1" KeyboardNavigation.TabIndex="7"
                         Text="{Binding Path=UserName, Mode=TwoWay}"/>

                <!--Password-->
                <Label Style="{StaticResource dialogLabel}" Grid.Row="1" Grid.Column="0" KeyboardNavigation.TabIndex="8">Password:</Label>
                <TextBox Style="{StaticResource dialogTextbox}" Grid.Row="1" Grid.Column="1" KeyboardNavigation.TabIndex="9"
                         Text="{Binding Path=Password, Mode=TwoWay}"/>
            </Grid>
        </GroupBox>
    </DockPanel>
</UserControl>
